package br.com.gaacorp.sai.webapp.action;

import java.io.Serializable;
import java.util.List;

import br.com.gaacorp.sai.webapp.action.BasePage;
import br.com.gaacorp.sai.model.Question;
import br.com.gaacorp.sai.service.GenericManager;

public class QuestionList extends BasePage implements Serializable {
    private GenericManager<Question, Long> questionManager;

    public void setQuestionManager(GenericManager<Question, Long> questionManager) {
        this.questionManager = questionManager;
    }

    public QuestionList() {
        setSortColumn("questionId"); // sets the default sort column
    }

    public List getQuestions() {
        return sort(questionManager.getAll());
    }
}

